<template>
  <div class="manage-container">
    <div class="tab-tree">
      <div class="tab-tree-title">
        <span>营销管理平台</span>
      </div>
      <tabs></tabs>
    </div>
    <div class="main-content">
      <div class="main-content-head">
        <div class="user-info">
          <div class="search-input">
            <img src="~/assets/icons/search.png" alt="搜索">
            <input type="text" placeholder="搜索....">
          </div>
          <div class="user-avatar">
            <span>策略中心管理员</span>
            <div class="circle-avatar">
              <img src="~/assets/mock/avatar.jpg" alt="" srcset="">
            </div>
          </div>
        </div>
        <div class="message-tip">
          <div class="refresh-icon flex-row-center">
            <img src="~/assets/icons/refresh.png" alt="" srcset="">
          </div>
          <div class="new-message flex-row-center">
            <img src="~/assets/icons/bell.png" alt="" srcset="">
            <div class="message-tip-icon"></div>
          </div>
        </div>
      </div>
      <div class="tab-content-detail">
        <router-view></router-view>
      </div>  
    </div>  
  </div>  
</template>

<script>
import { Icon, Input } from 'ant-design-vue'
import Tabs from '../../widgets/tabs/tabs'

export default {
  methods: {
    navToIndexPage() {
      this.$router.push('/manage/index')
    }
  },
  mounted() {
    this.$ajax({
      url: this.$apis.girls
    }).then(res => {
      console.log(res)
    })
  },
  components: {
    AIcon: Icon,
    AInput: Input,
    Tabs
  }
}
</script>

<style lang='less'>
.manage-container {
  width: 100%;
  height: 100%;
  display: flex;
}

/* 导航树 */
.tab-tree {
  width: 280/@rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-image: linear-gradient(0deg, #00a2d2 0%, #00bbdc 100%), linear-gradient(#ffffff, #ffffff);
}

.tab-tree-title {
  width: 100%;
  height: 144/@rem;
  font-size: 30/@rem;
  padding-top: 45/@rem;
  font-weight: 500;
  color: @white;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.main-content {
  height: 100%;
  width: 1640/@rem;
  display: flex;
  flex-grow: 1;
  flex-direction: column;
  justify-content: flex-start;
}

.main-content-head {
  width: 100%;
  height: 90/@rem;
  background-color: #ffffff;
  box-shadow: 0px 4px 7px 0px rgba(18, 17, 12, 0.04);
  display: flex;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

/* 主内容头部 */
.user-info {
  width: 1436/@rem;
  padding: 0 50 /@rem 0 30/@rem;
  box-sizing: border-box;
  border-right: 1px solid @borderColor;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.message-tip {
  display: flex;
  flex-grow: 1;
}

.search-input {
  width: 300/@rem;
  height: 50/@rem;
  border-radius: 25/@rem;
  background-color: @bgColor;
  display: flex;
  align-items: center;
  justify-content: center;

  img {
    width: 23/@rem;
    height: 21/@rem;
    margin-right: 20/@rem;
  }

  input {
    border: none;
    outline: none;
    font-size: 20/@rem;
    background: transparent;
  }
}

.user-avatar {
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 16/@rem;
  color: @lightTextColor;

  .circle-avatar {
    width: 52/@rem;
    height: 52/@rem;
    margin-left: 20/@rem;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;

    img {
      width: 52/@rem;
    }
  }
}

.message-tip {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.refresh-icon {
  width: 40%;
  height: 100%;
  cursor: pointer;

  img {
    width: 20/@rem;
    height: 22/@rem;
  }
}

.new-message {
  width: 40%;
  height: 100%;
  position: relative;
  cursor: pointer;

  img {
    width: 20/@rem;
    height: 22/@rem;;
  }

  .message-tip-icon {
    width: 10/@rem;
    height: 10/@rem;
    background-color: #ff6d4a;
    position: absolute;
    top: 28/@rem;
    right: 20/@rem;
    border-radius: 50%;
  }
}

.tab-content-detail {
  width: 100%;
  height: 100%;
  padding-bottom: 50/@rem;
  overflow-y: scroll;
  background-color: @contentBg;
}

.tab-content-detail::-webkit-scrollbar {
  display: none;
}
</style>
